﻿using System.Data.Entity.ModelConfiguration;
using RealtReview.DataAccess.Entities.IdentityProvider;

namespace RealtReview.DataAccess.Mappings
{
    public class AspNetRolesMap : EntityTypeConfiguration<AspNetRoles>
    {
        public AspNetRolesMap()
        {
            HasMany(e => e.AspNetUsers)
            .WithMany(e => e.AspNetRoles)
            .Map(m => m.ToTable("AspNetUserRoles").MapLeftKey("RoleId").MapRightKey("UserId"));
        }
    }
}